avis = Dir.glob("*.wmv")

avis.each{|fn|
    dest_fn="./인코딩한영상/#{fn}"
    if File.exists?(dest_fn) then
      puts "#{dest_fn} exists"
      puts `mencoder #{dest_fn} -o  -of lavf \
          -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc \
             -lavcopts vcodec=flv:vbitrate=1800:mbd=2:mv0:trell:v4mv:cbp:last_pred=3`
    end 
}
